home *** CD-ROM | disk | FTP | other *** search
Makefile | 1994-02-12 | 3.9 KB | 154 lines | [TEXT/MPS ] |
- # Makefile for MPW Flex
- # Franklin Chen
- # Fri, Jan 21, 1994 Version 2.4.6
-
- # @(#) $Header: Makefile.in,v 1.2 94/01/04 14:33:19 vern Exp $ (LBL)
-
- # If your version of "make" does not define $(MAKE), comment in the
- # definition of "MAKE" below. (You only need to do this if you intend
- # to do "make bigcheck" or "make dist".)
- MAKE = BuildProgram
-
- # Possible values for DEFS:
- #
- # For flex to always generate 8-bit scanners, add "-DDEFAULT_CSIZE=256"
- # to DEFS.
- #
- # For Vax/VMS, add "-DVMS" to DEFS.
- #
- # For MS-DOS, add "-DMS_DOS" to DEFS. See the directory :MISC:MSDOS for
- # additional info.
-
- COptions = ∂
- -mc68020 ∂
- # -mc68881 ∂
- # -elems881 ∂
- -warnings full ∂
- -opt full ∂
- # -finline-functions ∂
- # -fomit-frame-pointer ∂
- # -fstrength-reduce ∂
- -model far
- DEFS = ∂
- -d MPW ∂
- -d __STDC__ # for MPW C ∂
- -d HAVE_ALLOCA_H # for MPW C ∂
- -d HAVE_STRING_H ∂
- -d DEFAULT_CSIZE=256
- LOptions = -d -c 'MPS ' -t MPST ∂
- -model far
- LIBS = ∂
- "{CLibraries}"StdClib.o ∂
- "{Libraries}"Stubs.o ∂
- "{Libraries}"Runtime.o ∂
- "{Libraries}"Interface.o ∂
- "{Libraries}"ToolLibs.o
-
- srcdir = :
-
- YACC = Bison -y
- #YACC = byacc
- #C = gC
- C = C
-
- # You normally do not need to modify anything below this point.
- # ------------------------------------------------------------
-
- CPPFLAGS = -i : -i {srcdir} {DEFS}
-
- .c.o ƒ .c
- {C} {CPPFLAGS} {COptions} -s {default} {depDir}{default}.c -o {targDir}{default}.c.o
-
- HEADERS = flexdef.h version.h
-
- SOURCES = ccl.c dfa.c ecs.c gen.c main.c misc.c nfa.c parse.y ∂
- scan.l skel.c sym.c tblcmp.c yylex.c
- OBJECTS = ccl.c.o dfa.c.o ecs.c.o gen.c.o main.c.o misc.c.o nfa.c.o parse.c.o ∂
- scan.c.o skel.c.o sym.c.o tblcmp.c.o yylex.c.o
-
- LIBSRCS = libmain.c libyywrap.c
- LIBOBJS = libmain.c.o libyywrap.c.o
-
- # which "Flex" to use to generate scan.c from scan.l
- FLEX = :Flex
- FLEX_FLAGS = -ist {PERF_REPORT}
- COMPRESSION =
- PERF_REPORT = -p
-
- FLEXLIB = FlexLib.o
-
-
- all ƒ Flex
-
- Flex ƒƒ _bootstrap {OBJECTS} {FLEXLIB}
- Link -o Flex {LOptions} {OBJECTS} {FLEXLIB} {LIBS} ∂
- -sg Main=ccl,dfa,ecs,gen,main,misc,nfa ∂
- -sg Parse=parse,scan,sym,tblcmp,yylex
- Flex ƒƒ Flex.r
- Rez Flex.r -a -o Flex
-
- _bootstrap ƒ initscan.c
- Delete -i scan.c
- Duplicate -y {srcdir}initscan.c scan.c
- Echo "" > _bootstrap
-
- parse.c ƒ parse.y
- {YACC} -d {srcdir}parse.y
- sed '/extern char.*malloc/d' <y.tab.c >parse.c
- Delete -i y.tab.c
- Move -y y.tab.h parse.h
-
- parse.h ƒ parse.c
-
- scan.c ƒ scan.l
- {FLEX} {FLEX_FLAGS} {COMPRESSION} {srcdir}scan.l >scan.tmp
- sed "s,∂"{srcdir}scan.l∂",∂"scan.l∂"," <scan.tmp >scan.c
- Delete -i scan.tmp
-
- scan.c.o ƒ scan.c parse.h flexdef.h
- yylex.c.o ƒ yylex.c parse.h flexdef.h
-
- skel.c ƒ flex.skl mkskel.sh
- {srcdir}mkskel.sh {srcdir}flex.skl >skel.c
-
- main.c.o ƒ main.c flexdef.h version.h
- ccl.c.o ƒ ccl.c flexdef.h
- dfa.c.o ƒ dfa.c flexdef.h
- ecs.c.o ƒ ecs.c flexdef.h
- gen.c.o ƒ gen.c flexdef.h
- misc.c.o ƒ misc.c flexdef.h
- nfa.c.o ƒ nfa.c flexdef.h
- parse.c.o ƒ parse.c flexdef.h
- skel.c.o ƒ skel.c flexdef.h
- sym.c.o ƒ sym.c flexdef.h
- tblcmp.c.o ƒ tblcmp.c flexdef.h
-
- test ƒ check
- check ƒ Flex
- :Flex {FLEX_FLAGS} {COMPRESSION} {srcdir}scan.l ∂
- | sed "s,∂"{srcdir}scan.l∂",∂"scan.l∂"," ∂
- | diff scan.c -
- Echo "Check successful, using COMPRESSION={COMPRESSION}"
-
- bigcheck ƒ
- Delete -i scan.c ; {MAKE} -d COMPRESSION="-C" check
- Delete -i scan.c ; {MAKE} -d COMPRESSION="-Ce" check
- Delete -i scan.c ; {MAKE} -d COMPRESSION="-Cm" check
- Delete -i scan.c ; {MAKE} -d COMPRESSION="-Cfea" check
- Delete -i scan.c ; {MAKE} -d COMPRESSION="-CFer" check
- Delete -i scan.c ; {MAKE} -d COMPRESSION="-l" -d PERF_REPORT="" check
- Delete -i scan.c ; {MAKE}
- Echo "All checks successful"
-
- {FLEXLIB} ƒ {LIBOBJS}
- Lib -o {FLEXLIB} {LIBOBJS} ∂
- -sg Main=libmain,libyywrap
-
- install ƒ Flex {FLEXLIB} install_already_built
- install_already_built ƒ
- Duplicate Flex "{MPW}"Tools:Flex
- Duplicate UserStartup•Flex "{MPW}"UserStartup•Flex
- Duplicate Flex.Help "{MPW}"Flex.Help
- Duplicate {FLEXLIB} "{CLibraries}"FlexLib.o
- Duplicate {srcdir}FlexLexer.h "{CIncludes}"FlexLexer.h
-